package org.eenie.cartoonist.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import org.eenie.cartoonist.R;

/**
 * Created by Eenie on 2016/8/23 18:01.
 * Des：
 */

public class MultiLevelItemAdapter extends BaseAdapter {

    public Context mContext;

    public MultiLevelItemAdapter(Context context) {
        this.mContext = context;
    }

    @Override
    public int getCount() {
        return 10;
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup viewGroup) {
        if (convertView == null) {
            System.out.println("position = " + position);
            convertView = LayoutInflater.from(mContext).inflate(R.layout.multi_level_item, null);
        }
        return convertView;
    }
}
